//
//  CCForumPictureTableViewCell.m
//  CwinCar
//
//  Created by dlios on 15/10/24.
//  Copyright © 2015年 dlios. All rights reserved.
//

#import "CCForumPictureTableViewCell.h"

@implementation CCForumPictureTableViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.imageViewLable = [[UIImageView alloc]initWithFrame:CGRectMake(15 * suitableScreen_Width, 10 * suitableScreen_Height, 40 * suitableScreen_Width, 30 * suitableScreen_Height)];
        [self.contentView addSubview:self.imageViewLable];
        self.nameLable = [[UILabel alloc]initWithFrame:CGRectMake(60 * suitableScreen_Width, 10 *suitableScreen_Height, 120 *suitableScreen_Width, 30 * suitableScreen_Height)];
        self.nameLable.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:self.nameLable];
       
        
    }
    return self;
}
- (void)setData:(CCForumPictureModel *)model
{
    if (model.icon != nil) {
        
        [self.imageViewLable sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:[UIImage imageNamed:@"zhanweitu"]];
        [self.nameLable setText:model.name];
    }else
    {
        self.nameLable.text = model.forumName;
    }
}
- (void)setDataModel:(CCForumPictureModel *)forumPushModel
{
    
}
@end
